package br.com.univas.si6.sd1.jogo.client;

import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

public class MulticastClient {

	public void processar(String group, int port){
		
		String message = "Who's the SERVER??";
		
		try {
			
			DatagramSocket datagramSocket = new DatagramSocket();
			InetAddress address = InetAddress.getByName(group);
			
			DatagramPacket datagramPacket = new DatagramPacket(message.getBytes(), message.length(), address, port);
			
			datagramSocket.send(datagramPacket);
			
			datagramSocket.close();
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
